package com.example.hanfu_bk.controller;

import lombok.extern.slf4j.Slf4j;
import com.example.hanfu_bk.pojo.Style;
import com.example.hanfu_bk.service.ListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j//记录日志
@CrossOrigin(origins = "*")
public class ListController {
    @Autowired
    private ListService ListService;

    @GetMapping("/cate/list/{id}")
    public List<Style> getList(@PathVariable Integer id){
        return ListService.getList(id);
    }

}
